package com.hzy.oms.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import java.math.BigDecimal;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单中所包含的商品业务对象 oms_order_item
 *
 * @author zengxin
 * @date 2023-10-18
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class OrderItemBo extends BaseEntity {

    /**
     * ID
     */
    @NotNull(message = "ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 订单id
     */
    @NotNull(message = "订单id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orderId;

    /**
     * 产品id
     */
    @NotNull(message = "产品id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productId;

    /**
     * 商品编码
     */
    @NotBlank(message = "商品编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String outProductId;

    /**
     * 商品sku id
     */
    @NotNull(message = "商品sku id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long skuId;

    /**
     * sku编码
     */
    @NotBlank(message = "sku编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String outSkuId;

    /**
     * 商品快照id
     */
    @NotNull(message = "商品快照id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productSnapshotId;

    /**
     * sku快照id
     */
    @NotNull(message = "sku快照id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long skuSnapshotId;

    /**
     * 展示图片
     */
    @NotBlank(message = "展示图片不能为空", groups = { AddGroup.class, EditGroup.class })
    private String pic;

    /**
     * 产品名称
     */
    @NotBlank(message = "产品名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productName;

    /**
     * 销售价格
     */
    @NotNull(message = "销售价格不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal salePrice;

    /**
     * 采购价
     */
    @NotNull(message = "采购价不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal purchasePrice;

    /**
     * 购买数量
     */
    @NotNull(message = "购买数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer quantity;

    /**
     * 商品分类id
     */
    @NotNull(message = "商品分类id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productCategoryId;

    /**
     * 商品sku属性
     */
    @NotBlank(message = "商品sku属性不能为空", groups = { AddGroup.class, EditGroup.class })
    private String spData;


}
